import java.util.Scanner;

public class demo03 {
    //分巧克力
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
        int[][] arr=new int[n][2];
        for (int i = 0; i < n; i++) {
            arr[i][0]=sc.nextInt();
            arr[i][1]=sc.nextInt();
        }
        int max=0;
        int left=1;
        int right=100000;
        while (left<=right){
            int mid=(left+right)/2;
            int count=0;
            for (int i = 0; i < n; i++) {
                count+=(arr[i][0]/mid)*(arr[i][1]/mid);
            }
            if(count>=k){
                left=mid+1;
                max=mid;
            }else {
                right=mid-1;
            }
        }
        System.out.println(max);
    }
}


